<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 流年 <liu21st@gmail.com>
// +----------------------------------------------------------------------

// 应用公共文件

/**
 * 验证请求参数.
 *
 * @param  void
 *
 * @return string
 */
function mValidate()
{
    $request = request();

    // 验证客户端请求参数
    $validate = think\Loader::validate($request->controller());
    if (!$validate->scene($request->action())->check(input())) {
        return $validate->getError();
    } else {
        return '';
    }
}

/**
 * 获取资源访问地址
 *
 * @param string $path 资源文件路径
 *
 * @return string http 访问链接
 */
function locate($path)
{
    return '';
}
